<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="resources/scripts/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
$(function(){
	$.ajax({
		url:"/projectajax/UserServlet?type=getUserByName",
		beforeSend:function(){
			$("#div1").show()
		},
		data:{"name":"aaa"},
		success:function(data){
			$("#div1").hide()
		}
	})
})
</script>
</head>
<body>
	<div id="div1"><img width="50" height="50" src="1.gif"/></div>
</body>
</html>